import React from "react";
import store from "@/store"

export default function Count(){
  console.log(store);
  console.log(store.getState());
  return (
    <div>
      <h1>Count:{store.getState().count}</h1>
      <button onClick={()=>{
        store.dispatch({type:'count/increment',data:1})
      }}>累加count</button>
      <button onClick={()=>{
        store.dispatch({type:'count/decrement',data:5})
      }}>累减count</button>
    </div>
  )
}